package org.zcl.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.zcl.event.CustomEventPublisher;

/**
 *
 * @author: ZCL
 * @since: 2021/10/18 14:11
 */
@RestController
@RequestMapping("/event")
public class CustomEventController {

    @Autowired
    private CustomEventPublisher customEventPublisher;


    @RequestMapping("/publish")
    public String publish() {
        customEventPublisher.publish();
        return "success";
    }
}
